#pragma warning disable 108
using System;
using System.Runtime.InteropServices;
using System.Collections.Generic;
using Cephei;
using Cephei.Core;
using Cephei.Core.Generic;
using Microsoft.FSharp.Core;
using Cephei.QL.Termstructures;
using Cephei.QL.Cashflows;
using Cephei.QL;
namespace Cephei.QL.Instruments
{
    /// <summary> 
	/// ! \ingroup instruments  Note that the standard YoY inflation cap/floor defined here is different from nominal, because in nominal world standard cap/floors do not have the first optionlet.  This is because they set in advance so there is no point.  However, yoy inflation generally sets (effectively) in arrears, (actually in arrears vs lag of a few months) thus the first optionlet is relevant.  Hence we can do a parity test without a special definition of the YoY cap/floor instrument.  \test - the relationship between the values of caps, floors and the resulting collars is checked. - the put-call parity between the values of caps, floors and swaps is checked. - the correctness of the returned value is tested by checking it against a known good value.
	/// </summary>
    [Guid ("319E53FA-D3D4-4e4b-9C03-DF5468E12C90"),ComVisible(true)]
	public interface IYoYInflationCapFloor : Cephei.QL.IInstrument
	{
		///////////////////////////////////////////////////////////////
        // Methods
        //
        /// <summary> 
		/// 
		/// </summary>
		 Double AtmRate(Cephei.QL.Termstructures.IYieldTermStructure discountCurve);
        /// <summary> 
		/// 
		/// </summary>
		 Cephei.Core.IVector<Double> CapRates {get;}
        /// <summary> 
		/// 
		/// </summary>
		 Cephei.Core.IVector<Double> FloorRates {get;}
        /// <summary> 
		/// 
		/// </summary>
		 Double ImpliedVolatility(Double price, Cephei.QL.Termstructures.IYoYInflationTermStructure yoyCurve, Double guess, Microsoft.FSharp.Core.FSharpOption<Double> accuracy, Microsoft.FSharp.Core.FSharpOption<UInt32> maxEvaluations, Microsoft.FSharp.Core.FSharpOption<Double> minVol, Microsoft.FSharp.Core.FSharpOption<Double> maxVol);
        /// <summary> 
		/// 
		/// </summary>
		 Boolean IsExpired {get;}
        /// <summary> 
		/// 
		/// </summary>
		 Cephei.QL.Cashflows.IYoYInflationCoupon LastYoYInflationCoupon {get;}
        /// <summary> 
		/// 
		/// </summary>
		 DateTime MaturityDate {get;}
        /// <summary> 
		/// 
		/// </summary>
		 Cephei.QL.Instruments.IYoYInflationCapFloor Optionlet(UInt64 n);
        /// <summary> 
		/// 
		/// </summary>
		 DateTime StartDate {get;}
        /// <summary> 
		/// 
		/// </summary>
		 QL.Instruments.YoYInflationCapFloor.TypeEnum Type {get;}
        /// <summary> 
		/// 
		/// </summary>
		 Cephei.Core.IVector<Cephei.QL.ICashFlow> YoyLeg {get;}
    }   

    /// <summary> 
	/// ! \ingroup instruments  Note that the standard YoY inflation cap/floor defined here is different from nominal, because in nominal world standard cap/floors do not have the first optionlet.  This is because they set in advance so there is no point.  However, yoy inflation generally sets (effectively) in arrears, (actually in arrears vs lag of a few months) thus the first optionlet is relevant.  Hence we can do a parity test without a special definition of the YoY cap/floor instrument.  \test - the relationship between the values of caps, floors and the resulting collars is checked. - the put-call parity between the values of caps, floors and swaps is checked. - the correctness of the returned value is tested by checking it against a known good value. Factory
	/// </summary>
   	[ComVisible(true)]
    public interface IYoYInflationCapFloor_Factory 
    {
        ///////////////////////////////////////////////////////////////
        // Factory methods
        //
        /// <summary> 
		/// 
		/// </summary>
	    IYoYInflationCapFloor Create (QL.Instruments.YoYInflationCapFloor.TypeEnum type, Cephei.Core.IVector<Cephei.QL.ICashFlow> yoyLeg, Cephei.Core.IVector<Double> strikes, Cephei.QL.IPricingEngine QL_Pricer);
        /// <summary> 
		/// 
		/// </summary>
	    IYoYInflationCapFloor Create (QL.Instruments.YoYInflationCapFloor.TypeEnum type, Cephei.Core.IVector<Cephei.QL.ICashFlow> yoyLeg, Cephei.Core.IVector<Double> capRates, Cephei.Core.IVector<Double> floorRates, Cephei.QL.IPricingEngine QL_Pricer);
    }
}

